package com.heima.search.controller;

import com.heima.common.dto.ResponseResult;
import com.heima.search.dto.ApArticleSearchDto;
import com.heima.search.entity.ApAssociateWords;
import com.heima.search.service.impl.ApAssociateWordsServiceImpl;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 联想词表 前端控制器
 */
@RestController
@RequestMapping("/api/v1/associate")
@Api(tags = "联想词表接口")
public class AssociateWordsController {

    @Autowired
    private ApAssociateWordsServiceImpl apAssociateWordsService;


    @PostMapping("/search")
    public ResponseResult searchAssociate(@RequestBody ApArticleSearchDto dto){
        return apAssociateWordsService.searchAssociate(dto);
    }

}
